package org.example.lp.controller;

import org.example.lp.service.IDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.lang.NonNull;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @Autowired
    private IDemoService demoService;

    @GetMapping("/demo/{id}/{username}")
    public String demo(@NonNull @PathVariable Long id,
                     @NonNull @PathVariable String username) {
        demoService.mqSendDemo(id, username);
        return "ok";
    }

}
